package de.koller.reason.render.ray;

import de.koller.oceanFramework.plain.util.RRaster;

public class RayRenderer {

	public static final float FOV = (float)Math.PI / 3f;
	public static final float FARPLANE = 1000;
	
	protected IRenderData data;
	protected RRaster raster;
	
	public RayRenderer() {
	
	}

	public void render( IRenderData data, RRaster raster ) {
		this.data = data;
		this.raster = raster;
		
		//raster.clear( 0xff000000 );
		
		for( int x = 0; x < raster.width; x++ ) {
			for( int y = 0; y < raster.height; y++ )
				render( x, y );
			System.out.println( x + " / " + raster.width );
		}
	}
	
	private void render( int x, int y ) {
		FragmentRay f = new FragmentRay( this, x, y );
		raster.setPixel( f.getRasterColor(), x, y );
	}
	
}
